<template lang="pug">
.container.theme-pc(:class='getTheme')
  Loading(v-if='getIsHome && isShowLoading', @closeLoading='closeLoading')

  .content(v-if='panoInfo')
    .pano-wrap
      Pano(ref='Pano')
    template(v-if='isstartsceneShowThree')
      //- 房产简易模板的场景按钮
      .scene-menu.hand(v-if='getThemeType === 13 && getIsShowNight')
        img.w50.h40(
          src='@/assets/img/场景菜单.png',
          @click='$refs.Pano.handleDbClick()'
        )
      //- 动态模板
      div(v-if='!isVrMode')
        component(:is='getCurComponent')

        Ad
        Nav(v-if='getThemeType != 11 && getThemeType != 12')
        Login
        Notice(v-if='getThemeType != 11 && getThemeType != 12')
        Barrage(v-if='visibleBarrage && getThemeType != 11')
        PendantOvv
        PendantDraw
        //- OriginSiteLink
        TouchBar

      //- iframe
      SocketIframe
      MapIframe
      LinkIframe
      ImageIframe
      ThreeIframe
      VideoIframe
      PluginIframe
      RewardIframe
      StartRemindIframe
      VideoTransitionIframe

      DirectoryHotspot

      //- modal
      .dialog-wrap
        Cart
        Tel
        Say
        Addr
        Share
        Swiper
        Goods
        PanoStore
        Works(v-if='getWorksList')
        Graphic
        Checkout
        ScenePay
        Usercenter
        Welfare
        welfarePhone
        WelfareHistory

  //- 子路由层
  AppPage
</template>

<script>
// templatetype 模板id
// templatetype = 0 模板1
// templatetype = 1 模板2
// templatetype = 2 模板3
// templatetype = 3 模板4
// templatetype = 4 模板5
// templatetype = 5,7 模板6
// templatetype = 6 房地产模板
// templatetype = 8,9,10 807客户定制（生态模板，城市模板）
// templatetype = 11 航拍模板
// templatetype = 12 景点模板
// templatetype = 13 房地产简化模板

// 旧PC模板
import TplA from '@/template/a/pc'
import TplB from '@/template/b/pc'
import TplC from '@/template/c/pc'
import TplD from '@/template/d/pc'

// 新PC模板
import TplE from '@/template/e/pc'
import TplF from '@/template/f/pc'

import TplG from '@/template/g/pc'
import TplH from '@/template/h/pc'
import TplI from '@/template/i'
// TplN是由于房产模板id是13，在app.js里面拼class的时候要对应
import TplN from '@/template/n'

// 混入通用pc模块
import mixinTplPc from '@/mixins/tpl-pc'
import mixinApp from '@/mixins/app'
import vrMixins from '@/mixins/vr'

export default {
  name: 'pcHomePage',
  components: {
    TplA,
    TplB,
    TplC,
    TplD,
    TplE,
  },
  mixins: [mixinApp, mixinTplPc, vrMixins],
  data() {
    return {
      component: TplA,
    }
  },
  computed: {
    getCurComponent() {
      // console.log(this.getThemeType)
      if (this.getThemeType == 0) {
        this.component = TplA
      }
      if (this.getThemeType == 1) {
        this.component = TplB
      }
      if (this.getThemeType == 2) {
        this.component = TplC
      }
      if (this.getThemeType == 3) {
        this.component = TplD
      }
      if (this.getThemeType == 4) {
        this.component = TplE
      }
      if (this.getThemeType == 5 || this.getThemeType == 7) {
        this.component = TplF
      }
      if (this.getThemeType == 6) {
        this.component = TplG
      }
      if (this.getThemeType == 11) {
        this.component = TplH
      }
      if (this.getThemeType == 12) {
        this.component = TplI
      }
      if (this.getThemeType == 13) {
        this.component = TplN
      }
      return this.component
    },
  },
}
</script>

<style lang="stylus">
@import '../../assets/styles/pc-theme.styl'

.dialog-wrap
  .el-dialog__header
    background #f2f6fc
    padding 20px 20px 10px
  .el-dialog__body
    .dialog-content
      max-height 400px
      overflow-y auto
  .el-dialog__footer
    background #f9f9f9
</style>
